package com.xydtech.ecard.custgroup.mapper;

import com.xydtech.ecard.custgroup.domain.EcardApiCustomerGroupOrganize;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 社团组织信息Mapper接口
 *
 * @author yuzhiguo
 * @date 2024-11-29 上午9:32
 */
public interface EcardApiCustomerGroupOrganizeMapper {

    /**
     * 条件查询社团组织信息
     * @param ecardApiCustomerGroupOrganize
     * @return
     */
    List<EcardApiCustomerGroupOrganize> getOrganizeInfoList(EcardApiCustomerGroupOrganize ecardApiCustomerGroupOrganize);

    /**
     * 查询社团组织详情接口
     *
     * @param id
     * @return
     */
    EcardApiCustomerGroupOrganize selecteEardCustomerGroupOrganizeById(@Param("id") Long id);

    /**
     * 唯一值验证，相同法人机构、社团组织名称不能重复
     * @param ecardCustomerGroupOrganize
     * @return
     */
    int validateGroupOrganizeInfo(EcardApiCustomerGroupOrganize ecardCustomerGroupOrganize);

    /**
     * 保存社团组织信息
     * @param ecardCustomerGroupOrganize
     * @return
     */
    int addCustomerGroupOrganize(EcardApiCustomerGroupOrganize ecardCustomerGroupOrganize);

    /**
     * 更新社团组织信息的管户人id和机构id
     *
     * @param organizeId
     * @param creatorId
     * @param deptId
     * @return
     */
    int updateOrganizeUserId(@Param("organizeId") Long organizeId,
                             @Param("creatorId") Long creatorId,
                             @Param("deptId") Long deptId,
                             @Param("corpId") Long corpId);

    /**
     * 根据ID修改社团组织信息状态
     *
     * @param id
     * @return
     */
    int changeOrganizeStatus(@Param("id") Long id);
}
